package formServlets;

import java.io.Serializable;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

public class SchoolInfo implements Serializable {
	  @PrimaryKey
	    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	    private Key key;

	    @Persistent
	    private String placeId;       //unique placeid to refer to a place while user searches for school in a particular place

	    @Persistent
	    private String schoolId;    
	    
	    @Persistent
	    private String schoolName;
	    
	    @Persistent
	    private String website;    
	    
	    @Persistent
	    private int totalStudents;  
	    
	    @Persistent
	    private int avgGREScore;
	    
	    @Persistent
	    private float employmentPercentage;
	    
	    @Persistent
	    private float avgStudentGPA;
	    
	   // @Persistent
	   // private String major;
	    
	    @Persistent
	    private float percerntOfFundedStudents;
	    
	    public SchoolInfo( String placeId, String schoolName, String website)
	    {
	    this.placeId=placeId;
	    this.schoolId=schoolName+placeId;
	    this.schoolName=schoolName;
	    this.website=website;
	    this.totalStudents=0;
	    }

	    public Key getKey() {
	        return key;
	    }

	    public String getPlaceid() {
	        return this.placeId;
	    }

	    public String getSchoolId() {
	        return this.schoolId;
	    }

	    public String getSchoolName() {
	        return this.schoolName;
	    }
	    
	    public String getWebsite() {
	        return this.website;
	    }

	    
	    public void setPlaceId(String placeid) {
	    	this.placeId=placeid;
	    }

	    public void setSchoolId(String SchoolId) {
	        this.schoolId=SchoolId;
	    }
	    
	    public void setSchoolName(String SchoolName) {
	        this.schoolName=SchoolName;
	    }
	    
	    public void setWebsite(String website) {
	        this.website=website;
	    }

	    public void increaseStudents()
	    {
	    	this.totalStudents++;
	    }
	    
}

